<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<title>友情链接 -- Powered by CentIMS {$core_version}</title>
		<link href="{'bootstrap/css/bootstrap.css'|shared}" rel="stylesheet"/>
		<link href="{'bootstrap/css/bootstrap-responsive.css'|shared}" rel="stylesheet"/>
		<link href="{'common.css'|shared}" rel="stylesheet"/>
	</head>
	<body>
		<div class="workspace">
			{include file='core/views/vfs/vfs_navi.tpl'}			
			{if $page_tip_info}
		    <div class="alert alert-error">
		        <button class="close" data-dismiss="alert">×</button>
		        {$page_tip_info}
	      	</div>
	      	{/if}
			<div class="control-group pull-left">
				<div class="btn-group">
					<button class="btn btn-selectall"><i class="icon-check"></i>全选/反选</button>
			       	<a class="btn dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
			       	<ul class="dropdown-menu">
			           	{'get_link_bench_options'|fire}
			       	</ul>
			    </div>
			</div>
			
			<div class="pull-right txt-ar">
				<form class="form-inline" method="get" action=".">
					<select name="type" class="span2">
						<option value="">-分类-</option>
						{html_options values=$types output=$types selected=$type}
					</select>
				    <input type="text" class="input-medium" name="name" value="{$name}" placeholder="网站名"/>				    	    
				    <button type="submit" class="btn"><i class="icon-search"></i>搜索</button>
			    </form>
		    </div>
		    		    
		    <br class="clear"/>		
		    <table id="link-list" class="table table-striped table-bordered table-condensed">
				<thead>
					<tr>
						<th class="col_chk"><input type="checkbox"/></th>
						<th class="w50 txt-ac">{'LID'|sorth:link_id:$curl}</th>
						<th class="w200">{'网站名'|sorth:name:$curl}</th>
						<th class="wa">{'URL'|sorth:url:$curl}</th>
						<th class="w120">{'分类'|sorth:type:$curl}</th>
						<th class="w120">{'图片'|sorth:icon:$curl}</th>
						<th class="w80 txt-ac">{'排序'|sorth:sort:$curl}</th>
						<th class="w60 txt-ac">{'可见性'|sorth:display:$curl}</th>						
						<th class="w120 txt-ac">操作</th>
					</tr>
				</thead>
				<tbody>
					{foreach from=$items item=item}
					<tr>
						<td class="col_chk"><input type="checkbox" value="{$item.link_id}"/></td>
						<td class="txt-ac">{$item.link_id}</td>
						<td>{$item.name}</td>
						<td><a href="{$item.url}" title="{$item.title}" target="_blank">{$item.url|regex_replace:'/^https?:\/\//i':''}</a></td>
						<td>
							<span class="label label-info">{$item.type}</span>
						</td>
						<td>
							{if $item.icon}
							<a href="{$item.url}" class="thumbnail" title="{$item.title}" target="_blank">
								<img alt="{$item.name}" src="{$item.icon}"/>
							</a>
							{/if}
						</td>
						<td class="txt-ac">
							<input type="text" value="{$item.sort}" maxlength="4" class="small link-sort" rel="{$item.link_id}"/>							
						</td>
						<td class="txt-ac">
							{if $item.display}
							<span class="label label-success">是</span>
							{else}
							<span class="label">否</span>
							{/if}
						</td>
						<td class="tools">{'get_link_operation'|fire:$item}</td>
					</tr>
					{foreachelse}
					<tr>
						<td colspan="9" class="txt-ac">无记录</td>						
					</tr>
					{/foreach}
				</tbody>
			</table>
			
			<div class="form-horizontal">
				<div class="control-group pull-left">
					<div class="btn-group">
						<button class="btn btn-selectall"><i class="icon-check"></i>全选/反选</button>
			          	<a class="btn dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
			          	<ul class="dropdown-menu">
			            	{'get_link_bench_options'|fire}
			          	</ul>
			    	</div>
				</div>
				<div class="pagination pull-right">
					{$curl|paging:$totalCount:$limit:'start'}
			    </div>
		    </div>
		    <br class="clear"/>
			    	
		</div>
		<script type="text/javascript" src="{'jquery-1.7.1.js'|jquery}"></script>
		<script type="text/javascript" src="{'bootstrap/bootstrap.js'|shared}"></script>
		<script type="text/javascript" src="{'common.js'|shared}"></script>		
		<script type="text/javascript" src="link.js"></script>
	</body>
</html>
